package com.analog.mserver.common;

public class RestResult {
    /**
     * 成功或者失败的code错误码
     */
    private String code;
    /**
     * 成功时返回的数据，失败时返回具体的异常信息
     */
    private Object data;

    private String msg;
    
    
    public RestResult() {
    	this.code = "200";
    }

    /**
     * 成功返回
     * @param data
     */
    public RestResult(Object data) {
        this.code = "200";
        this.data = data;
        this.msg = "";
    }

    public RestResult(String code, Object data) {
        this.code = code;
        this.data = data;
        this.msg = "";
    }
    
    public RestResult(String code, Object data,String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
    
    

}
